package com.coocaa.ops.admin.v1.mergeposter.mapper;

import com.coocaa.ops.admin.v1.mergeposter.model.internal.AiPosterMergeDbInfo;
import com.coocaa.ops.admin.v1.mergeposter.model.query.PosterMergeDbQueryModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author bijiahao
 * @description
 * @date 2020/10/14 11:10
 */
public interface IAiPosterMergeMapper {
    /**
     * 查询海报合成所需的信息-普通推荐位
     *
     * @param model
     * @return
     */
    List<AiPosterMergeDbInfo> queryCommonBlockPosterMergeInfoList(PosterMergeDbQueryModel model);

    /**
     * 查询海报合成所需的信息-dmp推荐位
     *
     * @param model
     * @return
     */
    List<AiPosterMergeDbInfo> queryDmpBlockPosterMergeInfoList(PosterMergeDbQueryModel model);

    /**
     * 获取布局json-根据板块ID
     *
     * @param panelId
     * @return
     */
    String getLayoutJson(@Param("panelId") Integer panelId,
                         @Param("version") Integer version);

    /**
     * 获取布局json 板块当前版本的
     * @param panelId
     * @return
     */
    String getLayoutJsonForCurrentVersion(@Param("panelId") Integer panelId);

    /**
     * 查询普通板块id-通过普通推荐位id
     *
     * @param blockId
     * @return
     */
    Integer queryNormalPanelIdByBlockId(@Param("blockId") Integer blockId);

    /**
     * 查询分组板块id-通过普通推荐位id
     *
     * @param blockId
     * @return
     */
    Integer queryGroupPanelIdByBlockId(@Param("blockId") Integer blockId);
}
